//
//  SecondViewController.m
//  3DTouchOC
//
//  Created by uncle-R on 16/6/20.
//  Copyright © 2016年 uncle-R. All rights reserved.
//

#import "SecondViewController.h"

@interface SecondViewController ()

@end

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor orangeColor];
}
//
/**
 *  返回Actionitems 会自动调用
 */
- (NSArray<id<UIPreviewActionItem>>*)previewActionItems{
    UIPreviewAction * action = [UIPreviewAction actionWithTitle:@"分享" style:UIPreviewActionStyleDefault handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {
        
        NSLog(@"click: 分享");
    }];
    UIPreviewAction *action1 = [UIPreviewAction actionWithTitle:@"收藏" style:UIPreviewActionStyleDestructive handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {
          NSLog(@"click: 收藏");
    }];
    
    UIPreviewAction *action2 = [UIPreviewAction actionWithTitle:@"XXX" style:UIPreviewActionStyleSelected handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {
        NSLog(@"click: XXX");

    }];
    return @[action,action1,action2];
}

@end
